/**
 * @Date: Mar 3, 2010 11:57:33 AM
 */
package com.philip.journal.home.dao;

import java.util.List;

import com.philip.journal.core.dao.BaseDAOImpl;
import com.philip.journal.home.bean.ConfigItem;

/**
 * RTFC.
 *
 * @author cry30
 */
public class ConfigItemDAOImpl extends BaseDAOImpl<ConfigItem> implements ConfigItemDAO {

    @Override
    public List<ConfigItem> readAllByParent(final long parentId) {
        final Long param = parentId == 0 ? null : Long.valueOf(parentId);
        return super.readAllByParent("parent", "configId", param);
    }

    @Override
    public List<ConfigItem> readAll() {
        return super.readAll0(new String[] { "configId:asc" });
    }
}